package com.loveprogrammer.battle.action;

import com.loveprogrammer.battle.Hero;
import com.loveprogrammer.battle.action.Action;

/**
 * @ClassName BaseAttack
 * @Description 1v1
 * @Author admin
 * @Date 2024/2/20 17:43
 * @Version 1.0
 */
public class BaseAttack extends Attack {

    private Hero heroA;

    private Hero heroB;

    public BaseAttack(Hero heroA, Hero heroB) {
        this.heroA = heroA;
        this.heroB = heroB;
    }

    @Override
    public boolean run() {
        heroA.attack(heroB);
        return true;
    }

    @Override
    public boolean checkContinue() {
        return heroA.getHp()>0;
    }

}
